﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="AiRiZu.User.Message" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>
	爱日租—全球最时尚、最具先锋概念的房屋日租、短租服务网站！
</title>
<meta content="爱日租,日租,短租,租房,家庭公寓,自助公寓,家庭旅馆,旅游" name="keywords"/>
<meta content="爱日租是国内首家专注房屋短期租赁的信息发布和在线交易的网站，为房主和租户搭建起最值得信赖的沟通和交易平台" name="description"/>

<link rel="stylesheet" href="css/css.css" />
<link rel="stylesheet" href="css/howitworks.css" />

<link rel="stylesheet" href="css/common.css" />
<link rel="stylesheet" href="css/pixie.css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="layout" content="main"/>
<link rel="stylesheet" href="css/dashboard.css" />
<script type="text/javascript" src="../js/jquery.min.js"></script>

<script type="text/javascript">

function doFavorite(obj,messageId) {
	$.ajax({
		   type: "POST",
		   url: "/ajax/messageFavorite",
		   data: 'messageId='+messageId,
		   success: function(msg){
			
			
			   if (obj.src.indexOf("/images/star_fill.png")>0){
			
				   obj.src="/images/star_unfill.png";				   
				}else{
					obj.src="/images/star_fill.png";								
				}
			   
		}
		 });
	
}

</script>


<script type="text/javascript">

//$(document).ready(function(){
//        opts = {};
//        AirbnbHomePage.init(opts);
//    });

function addEventHandler(target, type, func) { 
    if (target.addEventListener) 
        target.addEventListener(type, func, false); 
    else if (target.attachEvent) 
        target.attachEvent("on" + type, func); 
    else target["on" + type] = func; 
} 
addEventHandler(document, 'scroll', function() {
	document.getElementById('list_loading').style.top = $('body').scrollTop() + 'px';
});

function shiftLanguage(lang, country) {
	$.ajax({
		   type: "POST",
		   url: "/ajax/versionInternationalize",
		   data: 'lang=' + lang + '&country=' + country,
		   success: function(msg){
		   	   if(msg == 'success') {
		   	   	   window.location.reload(true);
		   	   }
		   }
		 });
}

//$(document).bind('click',function(event){  
//    var url = event.target.href;
//    if(event.target.parentNode.href) {
//		url = event.target.parentNode.href;
//    }
//    if(url && url.indexOf('http://') == 0) {
//    	if(url.indexOf("?") != -1 && (url.indexOf("/city") != -1 || url.indexOf("/list") != -1 || url.indexOf("/show") != -1)) {
//	    	post_to_url(url);
//	        event.preventDefault();  
//	        event.stopPropagation();
//    	}  
//    }  
//      
//},true);

function post_to_url(url) {
	var flag = false; // 目录到/room/show页面时是弹出新窗口，flag = false 不弹出，true是弹出
	if(url.indexOf("/room/show") != -1 && url.indexOf("?src=list") != -1){
        flag = true;
    }

    var form = document.createElement("form");
    var baseUrl = url.substring(0, url.indexOf("?"));
    var params = url.substring(url.indexOf("?") + 1, url.length);
    params = decodeURIComponent(params);
    params = params.replace("+", " ");
    var s = params.split("&");
    form.setAttribute("method", "post");
    form.setAttribute("action", baseUrl);
    for(var i = 0; i < s.length; i ++) {
        var hiddenField = document.createElement("input");
        hiddenField.setAttribute("type", "hidden");
        hiddenField.setAttribute("name", s[i].split("=")[0].replace('locationSearch', 'location'));
        hiddenField.setAttribute("value", s[i].split("=")[1]);
        form.appendChild(hiddenField);
    }
    $('body').append(form);
    if(flag){
        form.target="_blank"; // /room/show 新窗口弹出
    }
    
    form.submit();
}
</script>


</head>
<body>
	
	<div class="header">
		<a class="logo" title="爱日租" href="#"></a>
        <div class="top_bar">
            <ul class="nav">
				<li>
				    <span class="SayHi"><%=Session["aliance"] != null? "嗨! " + Session["aliance"].ToString() : ""%></span>
				</li>

				<li><a href="#">用户中心</a></li>
					
                <li>
					<strong>
						<a href="/message/inbox.aspx" class="message">
							<span id="unReadMessages"></span>
						</a>
					</strong>
				</li>
				<li class="rounded">
					<a href="#">
						收藏
						<span class="star" title="收藏" id="userFavorites"></span>
					</a>
				</li>
                <li>
                    <a href="#">退出</a>				
                </li>
				
			
                <li style="display:none">
                    <span class="ChoLanguage selected"><a href="#">简体中文</a></span>
				</li>
	            <li style="display:none">
	                <span class="EngLanguage"><a href="#">English</a></span>
	            </li>
	        </ul>
		    <a href="../SendRoom.aspx" class="btn list_your_space">
			<span>发布房间</span>		</a>		</div>
		    <p class="customer_hot_line"><span>400-696-6656</span><a href="#">媒体报道</a></p>
	    </div>
	
	    <div id="command_center">

<ul id="nav">
	<li id="dashboardmenu"><a href="dashboard.aspx">我爱日租</a></li>
	<li id="inboxmenu"><a href="Index.aspx">收件箱</a></li>
	<li id="roomsmenu"><a href="MyRooms.aspx">我的房间</a></li>
	<li id="tripsmenu"><a href="Trips.aspx">出行计划</a></li>
	<li id="accountmenu"><a href="Warnset.aspx">账户信息</a></li>
	<li id="commentsmenu"><a href="Comments.aspx">评价推荐</a></li>
	<li id="vouchersmenu"><a href="Vouchersinvite.aspx">赢取租币</a></li>
</ul>


<ul class="subnav">
	<li id="inbox_submenu"><a href="Index.aspx">所有消息（<%=MessagesCount%>）</a></li>
	<li id="unread_submenu"><a href="Unread.aspx">未读消息（<%=UnreadMessagesCount%>）</a></li>
	<li id="booked_submenu" style="display:none"><a href="#none">订房</a></li>
	<li id="journey_submenu" style="display:none"><a href="#none">出行</a></li>
	<li id="favorite_submenu" style="display:none"><a href="#none">收藏</a></li>
	<li id="system_submenu" style="display:none"><a href="#none">系统</a></li>
	<li id="delete_submenu" style="display:none"><a href="#none">删除</a></li></ul>

		<input type="hidden" id="totalNumber" value="0" />
		<div id="inbox" class="box">
		    <div class="top"></div>	
			<div class="middle">
				<ul>
					
				</ul>
				
				<!-- paginator -->
				
				
				<div id="results_footer" style="">
					<div class="results_count">
						<b>
							<%=Messages %>
						</b> 共 <b> <%=MessagesCount%> 个信息</b>
					</div>
					<div id="results_pagination">
						<div class="pagination">
							
						</div>
					</div>
				</div>
			</div>
			<div class="bottom"></div>
		</div>
	</div>


	<!-- footer -->
	
<div id="footer">
  <p class="TxtEn">&copy; Copyright 2011 <a href="#">airizu.com 爱日租 版权所有</a>&nbsp;&nbsp;<a href="#">站内导航</a>&nbsp;&nbsp;京ICP证110553 号
	 <br/>
    <br/><img src="images/alipay.gif" width="123" height="40">&nbsp;&nbsp;
    <img src="images/tenpay.gif" width="96" height="40">&nbsp;&nbsp;    <img src="images/315.gif" width="89" height="40">    <img src="images/bluelogoair.gif"/></p>
</div>

</body>
</html>